<?php
namespace com\mvc\core;
class SessionUser{
	
	private $sessionVar;	

	public function __construct(){
		if (session_id()===''){
			session_start();
			$this->sessionVar = &$_SESSION;
		}
	}
	
	public function loadDataSession($values){
		foreach ($values as $key=>$value){
			$this->sessionVar[$key] = $value;
		}
	}

	public function validateSession(){
		$result = false;
		if( isset($this->sessionVar['user']) && $this->sessionVar['user']!='') {
			$result = true;
		}
		return $result;
	}
}
?>